<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="./Public/admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
		<div class="alert alert-success">编 辑 分 类</div>
		<form action="" method="post">
			<div class="form-group">
				<label for="exampleInputEmail1">分类名称</label>
				<input id="exampleInputEmail1" class="form-control" type="text" name="cname" value="{{$oldData['cname']}}" required="" placeholder="">
			</div>
			<div class="form-group">
				<label for="exampleInputEmail1">所属分类</label>
				<select name="pid" class="form-control">
					<option value="0">顶级分类</option>
					{{foreach from="$cateData" value="$c"}}
						<!--*****心得:<option value="{{$v['cid']}}"  所属分类,上一层父级分类,所以判断如果旧数据pid与$c数据的cip相同,则默认显示selected >{{$v['_name']}}</option>-->
						<!--*****心得:调用 _name 可以显示父子级树状结构  -->
						<option value="{{$c['cid']}}" {{if value="$oldData['pid'] == $c['cid'] "}}selected{{endif}} >{{$c['_name']}}</option>
					{{endforeach}}
				</select>
			</div>
			<div class="form-group">
				<label for="exampleInputEmail1">分类标题</label>
				<input id="exampleInputEmail1" class="form-control" type="text" name="ctitle" value="{{$oldData['ctitle']}}" placeholder="" required="" >
			</div>
			<div class="form-group">
				<label for="exampleInputEmail1">分类关键字</label>
				<textarea rows="5" cols=""  class="form-control" placeholder="" name="ckeywords">{{$oldData['ckeywords']}}</textarea>
			</div>
			<div class="form-group">
				<label for="exampleInputEmail1">分类描述</label>
				<textarea rows="5" cols=""  class="form-control" placeholder="" name="cdes">{{$oldData['cdes']}}</textarea>
			</div>
			<div class="form-group">
				<label for="exampleInputEmail1">分类排序</label>
				<input id="exampleInputEmail1" class="form-control" type="text" name="csort" value="{{$oldData['csort']}}" placeholder="" required=""  value="100">
			</div>
			<!--隐藏表单-->
			<input type="hidden" name="cid" id="cid" value="{{$_GET['cid']}}" />
			<button class="btn btn-primary btn-block" type="submit"> 确定修改 </button>
		</form>
		
	</body>
</html>
